package cn01;

import java.util.Scanner;

public class test01 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入身份证号：");
        String line = sc.nextLine();

        for (int i = 0; i < line.length(); i++) {
            if(line.length()!=18){
                System.out.println("长度不符合身份证号标准");
                System.exit(-1);
            }
        }
        for (int i1= 0; i1 < line.length() - 1; i1++) {
            if(i1>'0'&&i1<'9'){
            }else{
                System.out.println("内容不符合标准");
            }
            System.exit(-1);
        }
        for(int i2 =6;i2<line.length()-4;i2++){
            char[] chars = line.toCharArray();
            System.out.print(chars[i2]);
        }

    }
}

